package com.tools.utils;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class ValidationResult {

    private boolean valid;
    private String message;

    public static ValidationResult valid() {
        ValidationResult result = new ValidationResult();
        result.setValid(true);
        result.setMessage("验证通过");
        return result;
    }

    public static ValidationResult invalid(String message) {
        ValidationResult result = new ValidationResult();
        result.setValid(false);
        result.setMessage(message);
        return result;
    }
}
